import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: jingziyou
 * Date: 2023-03-02
 * Time: 18:26
 */
public class Test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] arr = new int[n][];
        for (int i = 0; i < n; i++) {
            arr[i] = new int[i + 1];
            arr[i][0] = 1;
            arr[i][i] = 1;
            if (i > 1) {
                for (int j = 1; j < arr[i].length - 1; j++) {
                    arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j];
                }
            }
        }
        for (int[] q :
                arr) {
            for (int x :
                    q) {
                System.out.print(x+" ");
            }
            System.out.println();
        }
    }
}
